import { createApp } from 'vue';
import ElementPlus from 'element-plus';
import './assets/common.scss';
import 'element-plus/dist/index.css';
import App from './App.vue';
import router from './router';
import store from './store';
import usePlugin from './util/usePlugin';
import WComponents from './components/menu';
import wForm from './components/form';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
import 'bootstrap/dist/css/bootstrap.min.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app.use(router).use(store);
app.use(ElementPlus, {
  locale: zhCn,
});
app.use(WComponents);
app.use(wForm);
usePlugin.add(app);
app.mount('#app');
